import { Router } from 'hyper-express';
import requireUser from '../../../middlewares/auth/requireUser';
import cache from '../../../middlewares/cache';
import rowLevelPermission from '../../../middlewares/auth/rowLevelPermission';
//#region AutoCreateCode
import { uctooCrmVisitLogController } from '../../../controllers';
const uctoocrmVisitLogRouter = new Router();
const crmVisitLogController = new uctooCrmVisitLogController();

uctoocrmVisitLogRouter.post('/add', requireUser, crmVisitLogController.add);
uctoocrmVisitLogRouter.post('/edit', requireUser, rowLevelPermission('uctoo/crm_visit_log'), crmVisitLogController.edit);
uctoocrmVisitLogRouter.post('/del', requireUser, rowLevelPermission('uctoo/crm_visit_log'), crmVisitLogController.delete);

//For getting crmVisitLog with permission control
uctoocrmVisitLogRouter.get('/:id', requireUser,  rowLevelPermission('uctoo/crm_visit_log'), crmVisitLogController.getSingle);
uctoocrmVisitLogRouter.get('/:limit/:page', requireUser,  rowLevelPermission('uctoo/crm_visit_log'), crmVisitLogController.getMany);
uctoocrmVisitLogRouter.get('/:limit/:page/:skip', requireUser,  rowLevelPermission('uctoo/crm_visit_log'), crmVisitLogController.getMany);

//#endregion AutoCreateCode
export default uctoocrmVisitLogRouter;
